//
//  Help.swift
//  lottery
//
//  Created by admin on 16/2/4.
//  Copyright © 2016年 jin. All rights reserved.
//

import UIKit

class Help: NSObject {
    var html:String!
    var id:String!
    var title:String!
    convenience init(dic:[String : AnyObject]) {
        self.init()
        self.setValuesForKeysWithDictionary(dic)
    }
    class func instanceOfFile()->[Help]
    {
        let path = NSBundle.mainBundle().pathForResource("help.json", ofType: nil)
        let data = NSData(contentsOfFile: path!)
        let arr:NSArray = try! NSJSONSerialization.JSONObjectWithData(data!, options: NSJSONReadingOptions.MutableContainers) as! NSArray
        var helps:[Help] = []
        for var i = 0;i < arr.count;i++
        {
            helps.append(Help(dic: arr[i] as! [String : AnyObject]))
        }
        return helps
    }

}
